using System;
using System.Xml;

namespace umlungu.engineX.webX.thoughts.Admin.service {
	/// <summary>
	/// umlungu engineX web framework, handlerX class.
	/// </summary>
	public class Topic : SoapX
	{
		/// <summary>Constructor</summary>
		public Topic() : base("service", "Topic") {
		}
		/// <summary>
		/// Method _Process:: calls delegate(s)
		/// </summary>
		protected override void _Process(XmlDocument xmldom, profileX profile, contentX content) {
			_Debug("Topic._Process(", Process, ") profile before:", profile.Xml.InnerXml);
			_Debug("Topic._Process(", Process, ") content:", content.Xml.InnerXml);
			switch (Process) {
				case "List":			ProcessResult(new ProcessServiceResult(Handlers.processTopicList));			break;
				case "Edit":			ProcessResult(new ProcessServiceResult(Handlers.processTopicEdit));			break;
				case "Add":				ProcessResult(new ProcessServiceResult(Handlers.processTopicAdd));			break;
				case "Delete":			ProcessResult(new ProcessServiceResult(Handlers.processTopicDelete));		break;
				case "GetBlog":			ProcessResult(new ProcessServiceResult(Handlers.processTopicGetBlog));		break;
				case "AddBlog":			ProcessResult(new ProcessServiceResult(Handlers.processTopicAddBlog));
										SubDir = profile.GetProfileValue("BlogSpaces");
										ProcessResult(new ProcessServiceResult(_ProcessImage));						break;
				case "GetAdd":			ProcessResult(new ProcessServiceResult(Handlers.processTopicGetAdd));		break;
				case "GetEdit":			ProcessResult(new ProcessServiceResult(Handlers.processTopicGetEdit));		break;
				case "GetDel":			ProcessResult(new ProcessServiceResult(Handlers.processTopicGetDel));		break;
				case "AddImage":		ProcessResult(new ProcessServiceResult(Handlers.processTopicAddImage));
										SubDir = profile.GetProfileValue("BlogSpaces");
										ProcessResult(new ProcessServiceResult(_ProcessImage));						break;
				case "Update":			ProcessResult(new ProcessServiceResult(Handlers.processTopicUpdate));		break;
				case "SetBlogspace":	ProcessResult(new ProcessServiceResult(Handlers.processSetBlogspace));		break;
				default:				ProcessResult(new ProcessServiceResult(Handlers.processServiceNoAction));	break;
			}
			_Debug("Topic._Process(", Process, ") profile after:", profile.Xmldoc.OuterXml);
		}
	}
}
		
